package com.example.eurekaconsumerfeignhystrix;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
//填个包名
@FeignClient(name = "eureka-producer", fallback = HelloRemoteHystrix.class)
public interface HelloRemote {

    //此类中的方法和远程服务中的方法名和参数需保持一致。
    @GetMapping("/hello/")
    String hello(@RequestParam(value = "name") String name);
}
